package com.neusoft.work.controller;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.neusoft.work.dto.DietCalendarDTO;
import com.neusoft.work.po.DietCalendar;
import com.neusoft.work.po.ResponseBean;
import com.neusoft.work.service.DietCalendarService;


@RequestMapping("/DietCalendarController")
@RestController

public class DietCalendarController {
    @Autowired
    private DietCalendarService bas;
    @RequestMapping("/addDietCalendar")
    public ResponseBean<Integer> addDietCalendar(DietCalendar bs) {
        return bas.addDietCalendar(bs);
    }
    @RequestMapping("/deleteDietCalendar")
    public ResponseBean<Integer> deleteDietCalendar(Integer id){
        return bas.deleteDietCalendar(id);
    }
    @RequestMapping("/updateDietCalendar")
    public ResponseBean<Integer> updateDietCalendar(DietCalendar bs){
        return bas.updateDietCalendar(bs);
    }
    @RequestMapping("/queryDietCalendar")
    public ResponseBean<List<DietCalendarDTO>> queryDietCalendar(Integer dayOfWeek,Integer mealType){
        return bas.queryDietCalendar(dayOfWeek, mealType);
    }


}